#ifndef MOUSEEATER_H
#define MOUSEEATER_H

#include <QMouseEvent>
#include <QObject>
#include <functional>

class MouseEater : public QObject
{
    Q_OBJECT
public:
    explicit MouseEater(std::function<bool(QMouseEvent*)> func, QObject *parent = nullptr);

private:
    std::function<bool(QMouseEvent*)> m_func;

    // QObject interface
public:
    bool eventFilter(QObject *watched, QEvent *event);
};

#endif // MOUSEEATER_H
